export default function form({t}) {
    return [
        {
            type: 'row',
            props: {gutter: 5},
            children: [
                {
                    type: 'col',
                    props: {span: 12},
                    children: [
                        {type: 'input',field: 'formName',value: '',title: '表单名称', props: {maxlength: 20, max: 20, clearable: true}},
                        {type: 'input',field: 'formId', hidden: true, value: '',title: '表单ID'},
                    ]
                },
                {
                    type: 'col',
                    props: {span: 12},
                    children: [
                        {
                            type: 'select',
                            field: 'formType',
                            value: 1,
                            style: { width: '100%'},
                            title: '表单类型',
                            options: [
                                {value: 2, label: '数据表单'},
                                {value: 1, label: '审核表单'},
                                {value: 3, label: '查询表单'},
                            ]
                        },
                        {
                            type: 'select',
                            field: 'formMode',
                            hidden: true,
                            value: '电脑端(PC)',
                            style: { width: '100%'},
                            title: '表单样式',
                            options: [
                                {value: '电脑端(PC)', label: '电脑端(PC)'},
                                {value: '移动端(H5)', label: '移动端(H5)'}
                            ]
                        }
                    ]
                }
            ]
        },
        {
            type: 'row',
            props: {gutter: 5},
            children: [
                {
                    type: 'col',
                    props: {span: 12},
                    children: [
                        {type: 'input',field: 'labelWidth',value: '100px',title: t('form.labelWidth')}
                    ]
                },
                {
                    type: 'col',
                    props: {span: 12},
                    children: [
                        {
                            type: 'select',
                            field: 'size',
                            value: 'default',
                            style: { width: '100%'},
                            title: t('form.size'),
                            options: [
                                {value: 'default', label: '正常'},
                                {value: 'large', label: '放大'},
                            ]
                        }
                    ]
                },
                {
                    type: 'col',
                    props: {span: 12},
                    children: [
                        {
                            type: 'select',
                            field: 'labelPosition',
                            value: 'right',
                            style: { width: '100%'},
                            title: t('form.labelPosition'),
                            options: [
                                {value: 'right', label: '左右'},
                                {value: 'top', label: '上下'},
                            ]
                        }
                    ]
                },
                {
                    type: 'col',
                    props: {span: 12},
                    children: [
                        {
                            type: 'select',
                            field: 'formStyle',
                            value: '',
                            style: { width: '100%'},
                            title: '表单样式',
                            options: [
                                {value: '', label: '默认样式'},
                                {value: 'word-style', label: '公文样式'},
                            ]
                        }
                    ]
                },
                {
                    type: 'col',
                    props: {span: 12},
                    children: [
                        { type: 'switch', field: 'hideRequiredAsterisk', value: false,title: '隐藏必填的星号'}
                    ]
                },
                {
                    type: 'col',
                    props: {span: 12},
                    children: [
                        {type: 'switch',field: 'showMessage',value: true,title: '显示校验信息'}
                    ]
                },
                {
                    type: 'col',
                    hidden: true,
                    props: {span: 12},
                    children: [
                        {type: 'switch',field: 'submitBtn',value: true,title: '显示提交按钮'}
                    ]
                },
                {
                    type: 'col',
                    hidden: true,
                    props: {span: 12},
                    children: [
                        {type: 'switch',field: 'resetBtn',value: false,title: '显示重置按钮'}
                    ]
                }
            ]
        },
        {
            type: 'switch',hidden: true,field: 'formConfirm',value: 'false', title: '提交确认框',
            control: [
                {
                    value: true,
                    rule: [
                        {
                            type: 'input',
                            field: 'confirmTips',
                            title: '确认框文字',
                            value: '确认要提交本次申请吗, 是否继续?'
                        },
                    ]
                }
            ]
        },
        {
            type: 'switch',field: 'formResource',value: false,title: '引用外部资源',
            control: [
                {
                    value: true,
                    rule: [
                        {
                            type: 'input',
                            field: 'resourceFiles',
                            title: '外部资源文件',//
                            value: '',
                            props: { type:'textarea', rows: 5, placeholder: '格式：({资源类型}:{资源地址})\r\n脚本引用 - script: xxx/xxx.js\r\n样式引用 - css:xxx/xxx.css\r\n多个资源请换行区分', }
                        },
                    ]
                }
            ]
        },
        {
            type: 'switch',field: 'formPrintMode',value: false,title: '自定义模板打印',
            control: [
                {
                    value: true,
                    rule: [
                        {
                            type: 'jd-upload',
                            field: 'resourceFiles',
                            title: '模板打印文件',
                            value: '配置模板',
                        },
                    ]
                }
            ]
        },
    ];
}
